/*
 * @Author: CC-TSR
 * @Date: 2021-01-08 08:57:20
 * @LastEditTime: 2021-07-22 15:55:18
 * @LastEditors: xiejiancheng1999@qq.com
 * @FilePath: \land\src\plugins\axios.js
 * @可以输入预定的版权声明、个性签名、空行等
 */
import Vue from "vue";
import axios from "axios";
import VueAxios from "vue-axios";

Vue.use(VueAxios, axios);

let baseURL =  
// "http://192.168.1.117:8088/LSP"
   "https://192.168.10.31:8088/LSP"
// "http://121.36.62.146:8088/LSP";

Vue.axios.defaults.baseURL = baseURL

Vue.axios.interceptors.request.use(config => {
  const token = sessionStorage.getItem("token");
  if (token) {
    config.headers.Authorization = "Bearer " + token;
  }
  return config;
});
const instance = axios.create({
  baseURL: baseURL
});
export default instance;